import { useI18n } from '@/hooks/web/useI18n'
import { reactive } from 'vue'
import { CrudSchema } from '@/hooks/web/useCrudSchemas'
const { t } = useI18n()

export default function () {
  const productCurdSchema = reactive<CrudSchema[]>([
    {
      field: 'selection',
      form: {
        hidden: true
      },
      search: {
        hidden: true
      },
      table: {
        type: 'selection'
      }
    },
    {
      field: 'id',
      label: t('customer.index'),
      search: {
        hidden: true
      },
      table: {
        headerAlign: 'center',
        align: 'center'
      }
    },
    {
      field: 'cusname',
      label: t('customer.cusname'),
      search: {
        component: 'Input'
      },
      table: {
        headerAlign: 'center',
        align: 'center'
      }
    },
    {
      field: 'phone',
      label: t('customer.phone'),
      form: {
        component: 'Input',
        formItemProps: {}
      },
      table: {
        headerAlign: 'center',
        align: 'center'
      }
    },
    {
      field: 'email',
      label: t('customer.email'),
      search: {
        hidden: true
      },
      form: {
        component: 'Input'
      },
      table: {
        headerAlign: 'center',
        align: 'center'
      }
    },
    {
      field: 'qq',
      label: t('customer.qq'),
      search: {
        hidden: true
      },
      form: {
        component: 'Input'
      },
      table: {
        headerAlign: 'center',
        align: 'center'
      }
    },
    {
      field: 'wechat',
      label: t('customer.wechat'),
      search: {
        hidden: true
      },
      form: {
        component: 'Input'
      },
      table: {
        headerAlign: 'center',
        align: 'center'
      }
    }
  ])

  return {
    productCurdSchema
  }
}
